package red.client.registry;

import red.internal.client.registry.DefaultRegistryInstance;

import java.util.Collection;
import java.util.List;

/**
 * @author Jin Zheng
 * @since 2020-07-12
 */
public interface RegistryInstance
{

	static RegistryInstance newInstance(String...names)
	{
		RegistryInstance instance = new DefaultRegistryInstance();
		for (String name : names)
		{
			instance.addName(name);
		}
		return instance;
	}

	void addName(String name);

	void addNames(Collection<String> names);

	void addHost(Host host);

	void addHosts(Collection<Host> hosts);

	String getName();

	List<String> getNameList();

	Host getHost();

	List<Host> getHostList();

}
